<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%-- <%@include file="../../../common/taglib/taglib.jsp"%> --%>
<form id="pagerForm" method="post" action="${baseURL }/user/info/list">
	<%@include file="../../common/pageParameter.jsp"%>
</form>
<div class="pageHeader">
	<form rel="pagerForm" onsubmit="return navTabSearch(this);" action="${baseURL }/user/info/list" method="post">
		<div class="searchBar">
			<table class="searchContent">
				<tr>
					<td colspan="2">
						用户编号：
						<input type="text" name="userNo" value="${rpUserInfo.userNo}" />
						&nbsp;&nbsp;
						登录账号：
						<input type="text" name="mobile" value="${rpUserInfo.mobile}" />
						&nbsp;&nbsp;
						用户名：
						<input type="text" name="userName" value="${rpUserInfo.userName}" />
					</td>
				</tr>
				<tr>
					<td>
						用户类型：
						<select name="userType" id="userType">
							<option value="">请选择</option>
							<c:forEach var="item" items="${UserTypeEnums}">
								<option value="${item.name }" <c:if test="${item.name == rpUserInfo.userType}"> selected="selected"</c:if>>${item.desc }</option>
							</c:forEach>
						</select>
						&nbsp;&nbsp;
						用户状态：
						<select name="status" id="status">
							<option value="">请选择</option>
							<c:forEach var="item" items="${MerchantStatusEnum}">
								<option value="${item.name }" <c:if test="${item.name == rpUserInfo.status}"> selected="selected"</c:if>>${item.desc }</option>
							</c:forEach>
						</select>

					</td>
					<td>
						<div class="buttonActive">
							<div class="buttonContent">
								<button title="查询" type="submit">查&nbsp;询</button>
							</div>
						</div>
					</td>
				</tr>
			</table>
		</div>
	</form>
</div>
<div class="pageContent">
	<div class="panelBar">
		<ul class="toolBar">
			<li>
				<shiro:hasPermission name="user:userInfo:add">
					<a title="添加用户" class="add" href="${baseURL }/user/info/addUI" target="navTab">
						<span>添加用户</span>
					</a>
				</shiro:hasPermission>
			</li>
			<li class="line">line</li>
		</ul>
	</div>
	<table class="table" width="2200" layoutH="137">
		<thead>
			<tr>
				<th width="36">序号</th>
				<th width="130">创建时间</th>
				<th width="180">用户编号</th>
				<th width="100">登录账号</th>
				<th width="200">用户名称</th>
				<th width="80">用户类型</th>
				<th width="50">状态</th>
				<th width="200">支付产品名称</th>
				<shiro:hasPermission name="user:userInfo:add">
					<th width="250">支付key</th>
					<th width="250">支付密钥</th>
				</shiro:hasPermission>
				<th>操作</th>
			</tr>
		</thead>
		<tbody>
			<c:forEach var="item" items="${pageBean.recordList}" varStatus="s">
				<tr>
					<td>${s.index + 1}</td>
					<td>
						<fmt:formatDate value="${item.createTime}" pattern="yyyy-MM-dd HH:mm:ss" />
					</td>
					<td>${item.userNo}</td>
					<td>${item.mobile}</td>
					<td>${item.userName}</td>
					<td>${item.userTypeDesc}</td>
					<td>
						<c:if test="${item.status=='ACTIVE'}">
							<font color="blue">${item.statusDesc}</font>
						</c:if>
						<c:if test="${item.status=='UNACTIVE'}">
							<font color="red">${item.statusDesc}</font>
						</c:if>
						<c:if test="${item.status!='ACTIVE' && item.status!='UNACTIVE'}">
							<font color="gray">${item.statusDesc}</font>
						</c:if>
					</td>
					<td>${item.rpUserPayConfig.productName}</td>
					<shiro:hasPermission name="user:userInfo:add">
						<td>${item.rpUserPayConfig.payKey}</td>
						<td>${item.rpUserPayConfig.paySecret}</td>
					</shiro:hasPermission>
					<td>
						<shiro:hasPermission name="user:userInfo:edit">
							[&nbsp;<a title="修改" target="navTab" href="${baseURL }/user/info/editUI?id=${item.id}" style="color: blue;">修改</a>&nbsp;]
							<c:if test="${item.status!='ACTIVE'}">
								[&nbsp;<a title="确定要激活吗？" target="ajaxTodo" href="${baseURL }/user/info/editStatus?id=${item.id}&status=100" style="color: red;">激活</a>&nbsp;]
							</c:if>
							<c:if test="${item.status=='ACTIVE'}">
								[&nbsp;<a title="确定要冻结吗？" target="ajaxTodo" href="${baseURL }/user/info/editStatus?id=${item.id}&status=101" style="color: blue;">冻结</a>&nbsp;]
							</c:if>
							[&nbsp;<a title="确定要重置密码吗？" target="ajaxTodo" href="${baseURL }/user/info/editPwd?id=${item.id}" style="color: blue;">重置密码</a>&nbsp;]
							<c:if test="${item.userType =='MERCHANT' || item.userType == 'NOT_DIRECT_MERCHANT'}">
								[&nbsp;<a title="查看二维码" target="navTab" href="${baseURL }/user/info/lookOneCode?id=${item.id}" style="color: blue;">查看二维码</a>&nbsp;]
							</c:if>
							<c:if test="${item.userType =='NOT_DIRECT_MERCHANT' || item.userType == 'NOT_DIRECT_AGENT'}">
								[&nbsp;<a title="查看代理信息" target="navTab" href="${baseURL }/user/info/lookAgentInfo?id=${item.id}" style="color: blue;">查看代理信息</a>&nbsp;]
							</c:if>
							
							
						</shiro:hasPermission>
						<shiro:hasPermission name="user:bankWay:edit">
							[&nbsp;<a title="设置通道附属信息" target="navTab" href="${baseURL }/user/bankWay/list?userNo=${item.userNo}" style="color: blue;">设置通道附属信息</a>&nbsp;]
							[&nbsp;<a title="查看二级商户成功率" target="navTab" href="${baseURL }/user/info/listSecondMerchantRelation?userNo=${item.userNo}" style="color: blue;">查看二级商户成功率</a>&nbsp;]
						</shiro:hasPermission>
					</td>
				</tr>
			</c:forEach>
			<c:if test="${pageBean.totalCount==0}">
				<tr>
					<td>暂无数据</td>
				</tr>
			</c:if>
		</tbody>
	</table>
	<%@include file="../../common/pageBar.jsp"%>
</div>
